package com.fire.tools;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Queue {

    public static void main(String[] args) {

    }

    /**
     * 反转数字  123  -- > 321
     * @param num
     */
    public static void queue(int num){
        int result = 0;
        while (num != 0){
            result = result * 10 + num % 10;
            num = num / 10;
        }
        System.out.println(result);
    }

    /**
     * 集合排序法
     */
    public void queueList(){
        //1、collections
        List<Integer> list = new ArrayList<Integer>();
        Collections.sort(list);
        //2、

    }

    public static void queueTest(int num){
        int a = num / 10;
        int x = num % 10;
        int y = a % 10;
        int b = a /10;
        int z = b % 10;
        int n = 100 * x + 10 * y + z;
        System.out.println("n:"+n);
        System.out.println(a);
        System.out.println(x);
        System.out.println(y);
        System.out.println(b);
        System.out.println(z);
        System.out.println(n);
    }



}
